// ******************************************************************
// * Copyright(c)  Steven Lu
// * Description   : Entity_FIN_CASH_AMOUNT
// * CreateDate    : 2012/1/3 10:54:20
// * Creater       : CodeSmith
// * LastChangeDate: 2012/1/3 10:54:20
// * LastChanger   : 2012/1/3 10:54:20
// * Version Info  : 1.0 For ESOL
// ******************************************************************

using System;
using System.Data;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Suzsoft.Smart.Data;
using ESOL.Common.Entity;

namespace ESOL.Business.Fin
{
/// <summary>
    /// FinCashAmount
    /// </summary>
    public partial class FinCashAmountBs
    {
        #region GetByID
        /// <summary>
        /// Get Entity
        /// </summary>
        /// <param name="objFinCashAmountEntity">Entity</param>
        /// <returns>Entity</returns>
        public static FinCashAmountEntity GetFinCashAmount(FinCashAmountEntity objFinCashAmountEntity)
        {
            return DataAccess.SelectSingle<FinCashAmountEntity>(objFinCashAmountEntity);
        }
        public static FinCashAmountEntity GetById(string cashAmountId)
        {
            if (string.IsNullOrEmpty(cashAmountId))
            {
                return null;
            }
            FinCashAmountEntity entity = new FinCashAmountEntity();
            entity.CashAmountId = cashAmountId;
            return DataAccess.SelectSingle<FinCashAmountEntity>(entity);
        }
        public static FinCashAmountEntity GetByCurrency(string currency)
        {
            if (string.IsNullOrEmpty(currency))
            {
                return null;
            }
            FinCashAmountEntity entity = new FinCashAmountEntity();
            entity.Currency = currency;
            return DataAccess.SelectSingle<FinCashAmountEntity>(entity);
        }
        #endregion

        #region Insert
        /// <summary>
        /// Insert Data
        /// </summary>
        /// <param name="objFinCashAmountEntity">Entity</param>
        /// <returns>true Insert Succeed; false Insert Fail</returns>
        public static bool InsertFinCashAmount(FinCashAmountEntity objFinCashAmountEntity)
        {
            return DataAccess.Insert(objFinCashAmountEntity);
        }

        public static bool InsertFinCashAmount(List<FinCashAmountEntity> objFinCashAmountEntityList)
        {
            return DataAccess.Insert(objFinCashAmountEntityList);
        }
        #endregion

        #region Update
        /// <summary>
        /// Update Data
        /// </summary>
        /// <param name="objFinCashAmountEntity">Entity</param>
        /// <returns>true Update Succeed; false Update Fail</returns>
        public static bool UpdateFinCashAmount(FinCashAmountEntity objFinCashAmountEntity)
        {
            return DataAccess.Update(objFinCashAmountEntity);
        }

        public static bool UpdateFinCashAmount(List<FinCashAmountEntity> objFinCashAmountEntityList)
        {
            return DataAccess.Update<FinCashAmountEntity>(objFinCashAmountEntityList);
        }
        #endregion

        #region Delete
        /// <summary>
        /// Delete Data
        /// </summary>
        /// <param name="objFinCashAmountEntity">Entity</param>
        /// <returns>true Delete Succeed; false Delete Fail</returns>
        public static bool DeleteFinCashAmount(FinCashAmountEntity objFinCashAmountEntity)
        {
            return DataAccess.Delete(objFinCashAmountEntity);
        }

        public static bool DeleteFinCashAmount(List<FinCashAmountEntity> objFinCashAmountEntityList)
        {
            return DataAccess.Delete<FinCashAmountEntity>(objFinCashAmountEntityList);
        }
        #endregion

        #region GetAll
        /// <summary>
        /// Get All Data
        /// </summary>
        /// <returns>Back All Data<returns>
        public static DataSet GetFinCashAmountAll()
        {
            return DataAccess.SelectAllDataSet<FinCashAmountEntity>();
        }
        /// <summary>
        /// Get All Data List
        /// </summary>
        /// <returns>Back All Data List<returns>
        public static List<FinCashAmountEntity> GetFinCashAmountAllList()
        {
            return DataAccess.SelectAll<FinCashAmountEntity>();
        }
        #endregion
	}
	
	
}	

